package com.sbillings.messenger.hub;

/**
 * A Message, consisting of a message source, a message type, and a message body.
 * @author steve.billings
 *
 */
public class Message {
	private final String source;
	private final MessageType type;
	private final String body;

	public Message(String source, MessageType type, String body) {
		this.source = source;
		this.type = type;
		this.body = body;
	}
	
	public String getSource() {
		return source;
	}

	public MessageType getType() {
		return type;
	}

	public String getBody() {
		return body;
	}

	public String toString() {
		return "Message: source: " + this.source + "; type: " + this.getType().getName() +
				"; " + this.getBody();
	}

}
